import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

// export const useCounterStore = defineStore('counter', () => {
//   const userInfo = ref()
//   return { userInfo}
// },{persist: true})
export const useCounterStore = defineStore('counter', {
  state: () => ({userInfo:""}),
  actions: {
    setUserInfo(value:string) {
          this.userInfo = value
        }
  },
  persist:{
    enabled:true,
    strategies:[
      {
        storage:localStorage,
        paths:["userInfo"]
      }
    ]
  }
})